package com.peanut.bosskg.service.other.sign;

import com.alibaba.fastjson.JSON;
import com.peanut.bosskg.entity.ResponseMessageVO;
import com.peanut.bosskg.entity.sign.SignSohoDTO;
import com.peanut.bosskg.entity.sign.SignSohoPageDTO;
import com.peanut.bosskg.entity.sign.SignSohoPageQueryDTO;
import com.peanut.bosskg.enums.FunCodeEnum;
import com.peanut.bosskg.service.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/***
 *
 *
 * 描    述：用户签约分页查询接口
 *
 */
@Service
@Slf4j
public class UserSignPageQueryService extends BaseService {


    /**
     * @param funCodeEnum
     * @param signSohoDTO
     * @return
     * @throws Exception
     */
    public List<SignSohoPageDTO> doBusiness(FunCodeEnum funCodeEnum, SignSohoPageQueryDTO queryDTO) throws Exception {
        log.info("用户签约分页查询接口开始:{}，{}", funCodeEnum, queryDTO);
        ResponseMessageVO responseMessage = applyYouFuByHttpPost(funCodeEnum, queryDTO);
        List<SignSohoPageDTO> sohoDTOs = JSON.parseArray(responseMessage.getResData(), SignSohoPageDTO.class);
        log.info("用户签约分页查询接口结束:{}", sohoDTOs);
        return sohoDTOs;
    }

}
